package com.yunzhong.appointment.mapper;


import com.yunzhong.appointment.entity.Scheduling;
import org.apache.ibatis.annotations.Delete;

import java.util.List;
import java.util.Map;

public interface SchedulingMapper {
    int deleteByPrimaryKey(String schedulingId);

    int insert(Scheduling record);

    int insertSelective(Scheduling record);

    Scheduling selectByPrimaryKey(String schedulingId);

    int updateByPrimaryKeySelective(Scheduling record);

    int updateByPrimaryKey(Scheduling record);
    
    /**
     * @description 根据医生外键删除数据
     * @author 石洪刚
     * @time 2017年9月11日09:50:12
     * @param id
     */
    @Delete("delete from scheduling where doctor_id = #{id}")
	void removeByDoctorId(String id);

    List<Scheduling> querySchedulingByDoctorId(String id);

    Scheduling queryScheduling(String id, String sj);

    /**
     * 医生排班预约
     * @return
     */
    List<Map<String, Object>> queryPb();
}